Skip to content

通过协议号查询签约

商户通过签约协议号可查询签约信息,如果对应签约状态为“已签约”,返回签约信息,如果对应签约状态为“已解约”,返回明确错误码

请求参数类型描述
contract_idstring签约协议号
queryobject声明请求的查询参数
appidstring服务商APPID
sub_mchidstring子商户号
sub_appidstring子商户APPID
php
$instance->v3->eduPapay->contracts->id->_contract_id_->getAsync([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/edu-papay/contracts/id/{contract_id}')->getAsync([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/edu-papay/contracts/id/{contract_id}']->getAsync([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduPapay->contracts->id->_contract_id_->get([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/edu-papay/contracts/id/{contract_id}')->get([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/edu-papay/contracts/id/{contract_id}']->get([
  'contract_id' => 'wx998877665544wx',
  'query' => [
    'appid' => 'wx8888888888888888',
    'sub_mchid' => '1900000109',
    'sub_appid' => 'wx8888888888888888',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sp_mchidstring服务商商户号
appidstring服务商APPID
sub_mchidstring子商户号
sub_appidstring子商户APPID
openidstring服务商APPID下的用户标识
sub_openidstring子商户APPID下的用户标识
plan_idstring签约模板号
contract_informationobject签约信息
contract_idstring签约协议号
contract_statusstring签约状态
create_timestring签约时间

参阅 官方文档

Published on the GitHub by TheNorthMemory